<?php
/**
 * 留言板
 * Enter description here ...
 * @author nijn
 *
 */
class MessageController extends ShopController{

	public $modelName = 'WebMessage';
	/**
	 * indexAction 默认页面
	 * submitAction 提交留言
	 */
   
//	public function actionSubmit(){
//		$model = new ShopMessage();
//		$this->render('submit',array(
//			'model'=> $model,
//		));
//	}

	public function actions() {
		return array(
			'index' => array(
				'class' => 'application.components.actions.front.ListAndEditAction',
				'criteria' => array(
					'condition' => 'worker_id = :uid',
					'params' => array(
						':uid' => $this->getProvider()->id
					),
				),
				'pageSize' => 4,
				'returnUrl' => array('index','uid' => $this->getProvider()->id),
				'view' => 'index',
			),
			'view'=>array(
				'class'=>'application.components.actions.front.ViewAction',
				'criteria' => array(
					'condition' => 'worker_id = :uid',
					'params' => array(
						':uid' => $this->getProvider()->id
					),
				),
				'view'=>'view',
			),
		); 	
	}
}

?>